#pragma once

#include "computer.h"

class ComputerBuilder
{
public:
    ComputerBuilder()          = default;
    virtual ~ComputerBuilder() = default;

public:
    ComputerBuilder &setMainboard(const std::string &mainboard)
    {
        m_mainboard = mainboard;
        return *this;
    };

    ComputerBuilder &setScreen(const std::string &screen)
    {
        m_screen = screen;
        return *this;
    };

    ComputerBuilder &setKeyboard(const std::string &keyboard)
    {
        m_keyboard = keyboard;
        return *this;
    };

    ComputerBuilder &setMouse(const std::string &mouse)
    {
        m_mouse = mouse;
        return *this;
    };

    ComputerBuilder &setCPU(const std::string &cpu)
    {
        m_cpu = cpu;
        return *this;
    };

    ComputerBuilder &setGPU(const std::string &gpu)
    {
        m_gpu = gpu;
        return *this;
    };

    Computer *buildComputer()
    {
        return new Computer(m_mainboard, m_screen, m_keyboard, m_mouse, m_cpu, m_gpu);
    }

private:
    std::string m_mainboard;
    std::string m_screen;
    std::string m_keyboard;
    std::string m_mouse;
    std::string m_cpu;
    std::string m_gpu;
};